home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11inc.lha / X11 / Xm / BulletinBP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-13  |  6.6 KB  |  211 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
  3.  * ALL RIGHTS RESERVED
  4. */ 
  5. /*   $RCSfile: BulletinBP.h,v $ $Revision: 1.18 $ $Date: 92/05/14 12:48:09 $ */
  6. /*
  7. *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
  8. /*
  9. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  10. #ifndef _XmBulletinBoardP_h
  11. #define _XmBulletinBoardP_h
  12.  
  13. #include <Xm/BulletinB.h>
  14. #include <Xm/ManagerP.h>
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20.  
  21. /****************************************************************************
  22.  * this suffix is added to dialog shells created by Xm convenience routines *
  23.  * so that, for example, a call to create a form dialog named f generates a *
  24.  * dialog shell named f_popup in addition to a form named f                 *
  25.  ****************************************************************************/
  26.  
  27. #define XmDIALOG_SUFFIX        "_popup"
  28. #define XmDIALOG_SUFFIX_SIZE    6
  29.  
  30.  
  31. /*  New fields for the BulletinBoard widget class record  */
  32.  
  33. typedef struct
  34. {
  35.     Boolean            always_install_accelerators;
  36.     XmGeoCreateProc         geo_matrix_create ;
  37.     XmFocusMovedProc    focus_moved_proc ;
  38.     XtPointer            extension;
  39. } XmBulletinBoardClassPart;
  40.  
  41.  
  42. /* Full class record declaration */
  43.  
  44. typedef struct _XmBulletinBoardClassRec
  45. {
  46.     CoreClassPart        core_class;
  47.     CompositeClassPart    composite_class;
  48.     ConstraintClassPart    constraint_class;
  49.     XmManagerClassPart    manager_class;
  50.     XmBulletinBoardClassPart    bulletin_board_class;
  51. } XmBulletinBoardClassRec;
  52.  
  53. externalref XmBulletinBoardClassRec xmBulletinBoardClassRec;
  54.  
  55.  
  56. /* New fields for the BulletinBoard widget record */
  57.  
  58. typedef struct
  59. {
  60.     Dimension    margin_width;        /*  margins        */
  61.     Dimension    margin_height;
  62.  
  63.     Widget        default_button;        /*  widgets        */
  64.     Widget        dynamic_default_button;    /*  widgets        */
  65.     Widget        cancel_button;
  66.     Widget        dynamic_cancel_button;
  67.  
  68.     XtCallbackList    focus_callback;        /*  callback lists    */
  69. #ifdef BB_HAS_LOSING_FOCUS_CB
  70.     XtCallbackList    losing_focus_callback;    /*  callback lists    */
  71. #endif
  72.     XtCallbackList    map_callback;
  73.     XtCallbackList    unmap_callback;
  74.  
  75.     XtTranslations    text_translations;
  76.  
  77.     XmFontList    button_font_list;    /*  font lists        */
  78.     XmFontList    label_font_list;
  79.     XmFontList    text_font_list;
  80.  
  81.     Boolean        allow_overlap;        /*  policies        */
  82.     Boolean        default_position;
  83.     Boolean        auto_unmanage;
  84.     unsigned char    resize_policy;
  85.  
  86.     Dimension        old_width;        /*  shadow resources    */
  87.     Dimension        old_height;
  88.     Dimension        old_shadow_thickness;
  89.     unsigned char    shadow_type;
  90.  
  91.     Boolean        in_set_values;        /*  internal flag    */
  92.     Boolean        initial_focus ;
  93.  
  94.     Boolean        no_resize;        /*  dialog resources    */
  95.     unsigned char    dialog_style;
  96.     XmString    dialog_title;
  97.     Widget        shell;
  98.     Widget        _UNUSED;
  99.  
  100.     XmGeoMatrix     geo_cache ;        /* Cache for geometry management.*/
  101. } XmBulletinBoardPart;
  102.  
  103.  
  104. /****************************************************************
  105.  *
  106.  * Full instance record declaration
  107.  *
  108.  ****************************************************************/
  109.  
  110. typedef struct _XmBulletinBoardRec
  111. {
  112.     CorePart        core;
  113.     CompositePart        composite;
  114.     ConstraintPart        constraint;
  115.     XmManagerPart        manager;
  116.     XmBulletinBoardPart    bulletin_board;
  117. } XmBulletinBoardRec;
  118.  
  119.  
  120. #define BB_CancelButton(w) \
  121.                   (((XmBulletinBoardWidget) w)->bulletin_board.cancel_button)
  122. #define BB_DynamicCancelButton(w) \
  123.           (((XmBulletinBoardWidget) w)->bulletin_board.dynamic_cancel_button)
  124. #define BB_DefaultButton(w) \
  125.                  (((XmBulletinBoardWidget) w)->bulletin_board.default_button)
  126. #define BB_DynamicDefaultButton(w) \
  127.          (((XmBulletinBoardWidget) w)->bulletin_board.dynamic_default_button)
  128. #define BB_MarginHeight(w) \
  129.                   (((XmBulletinBoardWidget) w)->bulletin_board.margin_height)
  130. #define BB_MarginWidth(w) \
  131.                    (((XmBulletinBoardWidget) w)->bulletin_board.margin_width)
  132. #define BB_ButtonFontList(w) \
  133.                (((XmBulletinBoardWidget) w)->bulletin_board.button_font_list)
  134. #define BB_LabelFontList(w) \
  135.                 (((XmBulletinBoardWidget) w)->bulletin_board.label_font_list)
  136. #define BB_TextFontList(w) \
  137.                  (((XmBulletinBoardWidget) w)->bulletin_board.text_font_list)
  138. #define BB_StringDirection(w) \
  139.                       (((XmBulletinBoardWidget) w)->manager.string_direction)
  140. #define BB_ResizePolicy(w) \
  141.               (((XmBulletinBoardWidget) w)->bulletin_board.resize_policy)
  142. #define BB_InSetValues(w) \
  143.           (((XmBulletinBoardWidget) w)->bulletin_board.in_set_values)
  144. #define BB_InitialFocus(w) \
  145.           (((XmBulletinBoardWidget) w)->bulletin_board.initial_focus)
  146.  
  147.  
  148. /********    Private Function Declarations    ********/
  149. #ifdef _NO_PROTO
  150.  
  151. extern Widget _XmBB_CreateButtonG() ;
  152. extern Widget _XmBB_CreateLabelG() ;
  153. extern void _XmBulletinBoardSizeUpdate() ;
  154. extern void _XmBulletinBoardFocusMoved() ;
  155. extern void _XmBulletinBoardReturn() ;
  156. extern void _XmBulletinBoardCancel() ;
  157. extern void _XmBulletinBoardMap() ;
  158. extern void _XmBulletinBoardSetDefaultShadow() ;
  159. extern void _XmBulletinBoardSetDynDefaultButton() ;
  160. extern void _XmBBUpdateDynDefaultButton() ;
  161.  
  162. #else
  163.  
  164. extern Widget _XmBB_CreateButtonG( 
  165.                         Widget bb,
  166.                         XmString l_string,
  167.                         char *name) ;
  168. extern Widget _XmBB_CreateLabelG( 
  169.                         Widget bb,
  170.                         XmString l_string,
  171.                         char *name) ;
  172. extern void _XmBulletinBoardSizeUpdate( 
  173.                         Widget wid) ;
  174. extern void _XmBulletinBoardFocusMoved( 
  175.                         Widget wid,
  176.                         XtPointer client_data,
  177.                         XtPointer data) ;
  178. extern void _XmBulletinBoardReturn( 
  179.                         Widget wid,
  180.                         XEvent *event,
  181.                         String *params,
  182.                         Cardinal *numParams) ;
  183. extern void _XmBulletinBoardCancel( 
  184.                         Widget wid,
  185.                         XEvent *event,
  186.                         String *params,
  187.                         Cardinal *numParams) ;
  188. extern void _XmBulletinBoardMap( 
  189.                          Widget wid,
  190.                          XEvent *event,
  191.                          String *params,
  192.                          Cardinal *numParams) ;
  193. extern void _XmBulletinBoardSetDefaultShadow( 
  194.                         Widget button) ;
  195. extern void _XmBulletinBoardSetDynDefaultButton( 
  196.                         Widget wid,
  197.                         Widget newDefaultButton) ;
  198. extern void _XmBBUpdateDynDefaultButton( 
  199.                          Widget bb) ;
  200.  
  201. #endif /* _NO_PROTO */
  202. /********    End Private Function Declarations    ********/
  203.  
  204.  
  205. #ifdef __cplusplus
  206. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  207. #endif
  208.  
  209. #endif /* _XmBulletinBoardP_h */
  210. /* DON'T ADD ANYTHING AFTER THIS #endif */
  211.